home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 21 / Cream of the Crop 21 (Terry Blount) (October 1996).iso / program / multlang.zip / MICONS.PAS < prev    next >
Pascal/Delphi Source File  |  1995-12-15  |  2KB  |  100 lines

  1. unit Micons;
  2.  
  3. interface
  4.  
  5. uses
  6.   SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls,
  7.   Forms, Dialogs, StdCtrls, Mask, Mcombbox, MultLang;
  8.  
  9. type
  10.   TIcons = class(TForm)
  11.     Label1: TLabel;
  12.     MultLang1: TMultLang;
  13.     Label3: TLabel;
  14.     Label4: TLabel;
  15.     CheckBox1: TCheckBox;
  16.     ComboBox1: TComboBox;
  17.     ComboBox2: TComboBox;
  18.     Label2: TLabel;
  19.     Label5: TLabel;
  20.     ComboBox3: TComboBox;
  21.     ComboBox4: TComboBox;
  22.     procedure FormClose(Sender: TObject; var Action: TCloseAction);
  23.     procedure CheckBox1Click(Sender: TObject);
  24.     procedure ComboBox1Change(Sender: TObject);
  25.     procedure ComboBox2Change(Sender: TObject);
  26.     procedure ComboBox3Change(Sender: TObject);
  27.     procedure ComboBox4Change(Sender: TObject);
  28.     procedure MultLang1Translated(Sender: TObject; LanguageName: String;
  29.       Successful: Boolean);
  30.   private
  31.     { Private declarations }
  32.   public
  33.     { Public declarations }
  34.   end;
  35.  
  36. var
  37.   Icons: TIcons;
  38.  
  39. implementation
  40.  
  41. {$R *.DFM}
  42.  
  43. procedure TIcons.FormClose(Sender: TObject; var Action: TCloseAction);
  44. begin
  45.   Action:=caFree;
  46. end;
  47.  
  48. procedure TIcons.CheckBox1Click(Sender: TObject);
  49. begin
  50.   MultLang1.ResizeIcon:=CheckBox1.Checked;
  51. end;
  52.  
  53. procedure TIcons.ComboBox1Change(Sender: TObject);
  54. begin
  55.   case ComboBox1.ItemIndex of
  56.     0 : MultLang1.AlignIcon:=alLeft;
  57.     1 : MultLang1.AlignIcon:=alCenter;
  58.     2 : MultLang1.AlignIcon:=alRight;
  59.   end;
  60. end;
  61.  
  62. procedure TIcons.ComboBox2Change(Sender: TObject);
  63. begin
  64.   case ComboBox2.ItemIndex of
  65.     0 : MultLang1.AlignText:=alLeft;
  66.     1 : MultLang1.AlignText:=alCenter;
  67.     2 : MultLang1.AlignText:=alRight;
  68.   end;
  69. end;
  70.  
  71. procedure TIcons.ComboBox3Change(Sender: TObject);
  72. begin
  73.   MultLang1.IconMargin:=ComboBox3.ItemIndex;
  74. end;
  75.  
  76. procedure TIcons.ComboBox4Change(Sender: TObject);
  77. begin
  78.   MultLang1.TextMargin:=ComboBox4.ItemIndex;
  79. end;
  80.  
  81. procedure TIcons.MultLang1Translated(Sender: TObject; LanguageName: String;
  82.   Successful: Boolean);
  83. begin
  84.   CheckBox1.Checked:=MultLang1.ResizeIcon;
  85.   case MultLang1.AlignIcon of
  86.     alLeft   : ComboBox1.ItemIndex:=0;
  87.     alCenter : ComboBox1.ItemIndex:=1;
  88.     alRight  : ComboBox1.ItemIndex:=2;
  89.   end;
  90.   case MultLang1.AlignText of
  91.     alLeft   : ComboBox2.ItemIndex:=0;
  92.     alCenter : ComboBox2.ItemIndex:=1;
  93.     alRight  : ComboBox2.ItemIndex:=2;
  94.   end;
  95.   ComboBox3.ItemIndex:=MultLang1.IconMargin;
  96.   ComboBox4.ItemIndex:=MultLang1.TextMargin;
  97. end;
  98.  
  99. end.
  100.